/*
 * ses_buzzer.h
 *
 *  Created on: Jun 28, 2013
 *      Author: ABBOUD
 */

#ifndef SES_BUZZER_H_
#define SES_BUZZER_H_

/* INCLUDES ******************************************************************/

#include "ses_common.h"

/* DEFINES & MACROS **********************************************************/

// Buzzer wiring on SES board

/* Buzzer ports and pins */
/* reference voltage and prescaling */
#define BUZZ_PORT       	PORTG
#define BUZZ_PIN         	5
#define TCNT_INIT           0
#define OCR0B_INIT          0
#define OCR0B_BUZZ          0X7F

/* TYPES ********************************************************************/



/* FUNCTION PROTOTYPES *******************************************************/

/*
 * initializes Buzzer
 */
void buzz_Init(void);


/*
 * activate Buzzer
 */
void buzz_Act(void);


/*
 * deactivate buzzer
 */
void buzz_Deact(void);


/*
 * Buzzer Alarm Period
 */
void buzz_Act_Period(uint16_t time);

/*
 * Alarm periodic Buzzer active forever
 */
void buzz_Act_Periodic_Forever(uint16_t time_ON, uint16_t time_OFF);

/*
 * Alarm periodic Buzzer for Time -total-
 */
void buzz_Act_Periodic(uint16_t time_ON, uint16_t time_OFF, uint16_t time_total);


#endif /* SES_BUZZER_H_ */
